package excerciseSeven1;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		Fraction a = new Fraction(in.nextInt(), in.nextInt());
		Fraction b = new Fraction(in.nextInt(),in.nextInt());
		a.print();
		b.print();
		a.plus(b).print();
		a.multiply(b).plus(new Fraction(5,6)).print();
		a.print();
		b.print();
		in.close();
	}
}    

class Fraction{
	int fenzi;
	int fenmu;
	Fraction(int a, int b){
		this.fenzi=a;
		this.fenmu=b;
	}
	double toDouble(){
		return this.fenzi/(double)this.fenmu;
	}
	Fraction plus(Fraction r){
		
		int a,b;
		b=this.fenmu*r.fenmu;
		a=this.fenzi*r.fenmu+this.fenmu*r.fenzi;
		Fraction c=new Fraction(a,b);
		return c;
	}
	Fraction multiply(Fraction r){
		int a,b;
		a=this.fenzi*r.fenzi;
		b=this.fenmu*r.fenmu;
		Fraction c=new Fraction(a,b);
		return c;
	}
	void print(){
		int r;
		int a,b;
		int c=gcd(fenzi, fenmu);
		a=this.fenzi/c;
		b=this.fenmu/c;
		System.out.println(a+"/"+b);
	}
	
	int gcd(int x, int y){
	    if(y == 0)
		        return x;
	     else
		        return gcd(y,x%y);
	}

}